.textInput_box{
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin: 16px;
    .textInput{
        background: var(--bg-secondary);
        border-radius: 8px;
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        .textInput_imgList {
            width: 100%;
            .imgList_container {
                display: flex;
                flex-wrap: wrap;
                gap: 12px;
                margin-top: 8px;
                
                .textInput_imgItem {
                    position: relative;
                    width: 80px;
                    height: 80px;
                    box-shadow: 0 2px 4px var(--accent-secondary);
                    cursor: pointer;
                    
                    img{
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        border-radius: 6px;
                    }
                    .textInput_imgDelete{
                        position: absolute;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: 12px;
                        height: 12px;
                        right: 0;
                        top: 0;
                        transform: translate(50%,-50%);
                        background-color: red;
                        border-radius: 50%;
                        z-index: 30;
                        transition: 0.2s all ease-in;
                        svg{
                            width: 60%;
                            height: 60%;
                        }
                        &:hover{
                            width: 16px;
                            height: 16px;
                        }
                    }
                }
            }
        }
        .textInput_fileList{
            width: 100%;
            .fileList_container{
                display: flex;
                flex-wrap: wrap;
                gap: 12px;
                margin-top: 8px;
                .textInput_fileList_item{
                    position: relative;
                    display: flex;
                    align-items: center;
                    border-radius: 4px;
                    padding: 8px;
                    background-color: var(--bg-tertiary);
                    line-height: 1.5;
                    min-width: 160px;
                    cursor: pointer;
                    span{
                        display: flex;
                        align-items: center;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }
                    svg{
                        width: 16px;
                        height: 16px;
                    }
                    .textInput_fileList_item_left{
                        display: flex;
                        gap: 6px;
                        cursor: pointer;
                    }
                    .textInput_fileList_item_del{
                        position: absolute;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: 12px;
                        height: 12px;
                        right: 0;
                        top: 0;
                        transform: translate(50%,-50%);
                        background-color: red;
                        border-radius: 50%;
                        z-index: 30;
                        transition: 0.2s all ease-in;
                        svg{
                            width: 60%;
                            height: 60%;
                        }
                        &:hover{
                            width: 16px;
                            height: 16px;
                        }
                    }
                }
            }
        }
        .textInput_inputArea{
            display: flex;
            align-items: center;
            width: 100%;
            textarea{
                flex: 1;
                background: transparent;
                border: none;
                resize: none;
                outline: none;
                padding: 0 8px;
                min-height: 32px;
                max-height: 200px;
                font-size: 16px;
                line-height: 32px;
                color: var(--text-primary);
            }
            .textInput_input_box{
                $font-height: 32px;
                flex: 1;
                width: 0;
                background: transparent;
                border: none;
                outline: none;
                overflow-y: auto;
                padding: 0 8px;
                min-height: $font-height;
                max-height: calc($font-height * 5);
                font-size: 16px;
                line-height: 32px;
                color: var(--text-primary);
                &:empty::before {
                    content: attr(data-placeholder);
                    color: #999;
                    pointer-events: none; /* 防止伪元素干扰点击 */
                }
            }
            .textInput_actions{
                position: relative;
                display: flex;
                margin-left: 8px;
                align-items: center;
                &::before{
                    position: absolute;
                    content: '';
                    width: 2px;
                    height: 50%;
                    background-color: #555555;;
                }
                .textInput_action{
                    width: 32px;
                    height: 32px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 4px;
                    color: var(--text-tertiary);
                    cursor: pointer;
                    transition: var(--transition);
                    &:hover{
                        background: #4f545c29;
                    }
                }
                .pulsating-dot {
                    width: 12px;
                    height: 12px;
                    border-radius: 50%;
                    background-color: #F44336;
                    box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
                    animation: pulse 1.5s infinite;
                }
            }
        }
    }
     &.disabled {
        opacity: 0.6;  // 整体降低透明度
        cursor: not-allowed;  // 显示禁用光标
        
        .textInput {
            background: var(--bg-tertiary);  // 添加新的禁用背景色变量
        
            textarea {
                cursor: not-allowed;
            }
            
            .textInput_actions {
                border-left-color: var(--border-tertiary);  // 更改分割线颜色
                
                .textInput_action {
                    color: var(--text-tertiary);  // 图标变灰
                    cursor: default;
                
                    &:hover {
                        background: transparent !important;  // 移除悬停效果
                    }
                }
            }
        }
    }
}

.far{
    font-weight: 400;
}
.fas{
    font-weight: 900;
}

.emoji_popup{
    $emoji_width: 36px;
    $emoji_height: 36px;
    height: calc($emoji_width * 6);
    width: calc($emoji_width * 9 + 12px);
    padding: 6px;
    padding-right: 12px;
    background-color: rgb(42, 43, 54);
    border-radius: 8px;
    box-shadow: var(--accent-secondary) 0px 4px 12px;
    overflow-y: scroll;
    transition: 0.2s;
    border: 1px solid rgb(58, 59, 69);
    outline: none;
    .emoji_box{
        display: grid;
        grid-template-columns: repeat(auto-fill, $emoji_width);
        .emoji_item{
            display: flex;
            align-items: center;
            justify-content: center;
            height: $emoji_width;
            width: $emoji_width;
            box-sizing: border-box;
            cursor: pointer;
            border-radius: 4px;
            transition: 0.1s all ease;
            font-size: 24px;
            &:hover{
                background-color: #4f545c29;
                font-size: 28px;
            }
        }
    }
}

/* 移动端优化：添加媒体查询并调整关键组件 */
@media (max-width: 768px) {
    .textInput_box {
        padding: 12px;
        margin: 8px;
        
        .textInput {
            padding: 8px;
            
            /* 图片列表适配 */
            .textInput_imgList .imgList_container {
                gap: 8px;
                .textInput_imgItem {
                width: 70px;
                height: 70px;
                
                /* 增大删除按钮触控区域 */
                .textInput_imgDelete {
                    width: 22px !important;
                    height: 22px !important;
                    &:hover {
                    width: 24px !important;
                    height: 24px !important;
                    }
                }
                }
            }
            
            /* 文件列表项适配 */
            .textInput_fileList .fileList_container {
                gap: 8px;
                .textInput_fileList_item {
                min-width: 140px;
                padding: 10px;
                
                /* 增大文件删除按钮 */
                .textInput_fileList_item_del {
                    width: 22px !important;
                    height: 22px !important;
                    &:hover {
                    width: 24px !important;
                    height: 24px !important;
                    }
                }
                }
            }
            
            /* 输入区域优化 */
            .textInput_inputArea {
                flex-direction: column;
                align-items: stretch;
                
                .textInput_input_box {
                    width: 100%;
                    font-size: 15px;
                    min-height: 28px;
                    max-height: 150px;
                    line-height: 28px;
                }
                
                /* 操作按钮组重排 */
                .textInput_actions {
                    margin: 10px 0 0;
                    border-top: 1px solid #555;
                    
                    &::before { display: none } /* 移除原分割线 */
                    
                    .textInput_action {
                        width: 42px;
                        height: 42px;
                        margin: 0 6px;
                    }
                }
            }
        }
    }
  
    /* 表情弹出框响应式 */
    .emoji_popup {
        width: 90vw !important;
        max-width: 360px;
        height: 50vh;
        
        .emoji_box {
            grid-template-columns: repeat(8, 1fr);
            .emoji_item {
                width: 36px !important;
                height: 36px !important;
                font-size: 22px;
            }
        }
    }
}

/* 通用移动优化：所有按钮增大触控区域 */
.textInput_imgDelete,
.textInput_fileList_item_del,
.textInput_action {
    @media (pointer: coarse) {
        min-width: 44px;
        min-height: 44px;
    }
}